package com.example.springmacexercise.demo.model.person;

import com.example.springmacexercise.demo.model.Person;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/p")
@ResponseBody
public class PersonController {
    @RequestMapping("/index")
    public Object index(Person person){
        System.out.println(person.getName() +":" + person.getPassword());
        return "/index.html";
    }
}
